const HtmlWebpackPlugin = require('html-webpack-plugin');

const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
    entry: './src/main.js',
    output: {
        filename: 'bundle.js',
        path: __dirname + '/dist',
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./public/index.html"
        }),

        new VueLoaderPlugin()
    ],
    module: { // 加载器
        rules: [ // 规则数组
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            }

        ]
    }
}